﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        category_id: {{ new_category_id }},
        category_name: '',
        orderno: '',
    },

    methods: {
        /**
         * 创建新的礼物分类
         */
        newGiftCategory() {
            let url = "{% url 'gma:api_new_gift_category' %}";
            let data = {
                'category_id' : this.category_id,
                'category_name' : this.category_name,
                'orderno' : this.orderno,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('创建成功');
                redirect();
            });
        },

        cancel() {
            window.history.back();
        },
    },

    mounted() {
    },
});
